Maple 2025 Questions and Posts

These are Posts and Questions associated with the product, Maple 2025

When there is a large Matrix in a worksheet, asking Maple to export the worksheet to PDF, the matrix is truncated in the PDF. Only one page of it shows.

Is there a way to tell Maple not to truncate large matrix, even if goes over many pages?

I need to export eveything in the worksheet to PDF.

Here is an example

restart;
interface(rtablesize = infinity);

A:=Array(1 .. 0);
for n from 1 to 50 do
    A,= [n];
od:

convert(convert(A,listlist),Matrix);

When I do , from menu, File->Export As and select PDF, then open the PDF, I only see half the matrix in the PDF.

Attached the PDF also.

Worksheet mode, Maple 2025.2

Is this a bug? export should export everything in worksheet.

truncate_output.pdf

truncate_output.mw

Update

Found a workaround.

First, I tried to print to pdf, istead of export to pdf. That also did not work.

Then I tried DocumentTools:-Tabulate instead, and now this worked. The PDF has the full content, not truncated.

i.e. instead of  

convert(convert(A,listlist),Matrix);

Did this:

the_table:=convert(A,listlist):
DocumentTools:-Tabulate(A,'width'=400,widthmode='pixels', etc...); #change as needed

For some reason, Matrix is truncated when exporting to PDF, but not Tabulate.

I think it is a bug for Maple to truncate the Matrix in PDF,  but workaround exist, so not critical.

Hello all,

This will be my LAST (I swear) question about translating a little function from Mathematica to Maple.

rand := RandomReal[{-5, 5}, 20]

ListPlot[rand]

 

ListListLinePlot[rand]

In[16]:= line = Fit[rand, {1, x}, x]

Out[16]= 0.247498 - 0.0131912 x

In[17]:= parabol = Fit[rand, {1, x, x^2}, x]

Out[17]= -1.82858 + 0.31249 x - 0.0082569 x^2

In[18]:= cos = Fit[rand, {1, x, Cos[x]}, x]

Out[18]= 0.483172 - 0.0302095 x - 0.271457 Cos[x]

Plot[{ListLinePlot[rand], line, parabol, cos}, {x, 0, 20}]

#graph omitted by request of users here.

So, then, my LAST question will be :

How to translate this to Maple ?

Thank you very much.

JM

Hello again,

I think I have not been clear enough in my question.

I reformulate :

Is it possible in Maple to create matrices whose elements are also matrices

and this to any level ?

For the Dimensions of a matrix it's ok for me.

thank you 

JM

Hello all,

I just need a hint how to enter "matrices" in Maple which are lists of lists and so on.

Since I gave up on "math"ematica I would like to be able to enter what is just

below (with the dimension).

Is it doable in Maple...I guess yes :)

M = {{a, {1, a, -0.5}}
, {{b, {1}}}, c + d}
Out[5]= {a, {1, a, -0.5}, {{b, {1}}}, c + d}
In[8]:= MatrixForm[M]
Out[8]//MatrixForm=
a
{1, a, -0.5}
{{b, {1}}}
c + d
In[9]:= Dimensions[M]
Out[9]= {4}

PS: Is a moderator ready to make me with a reputation of 100 in order I can enter tags.

Thank you for everything.

Regards,

JM

I am not able to find place in help which lists which changes interface(typesetting = extended); makes compared to interface(typesetting = standard);

Reason  I am asking, is that in interface(typesetting = extended); Maple adds a small annoying "dot"  between each term for multiplication, which is not there in standard.

Is there a place in documentation that mentions this as part of extended? Where to find it?

in Matlab and Mathematica it is possible to put the labels in contour plot, directly on the lines (with nice positioning).

This makes it much much easier to see the level of each contour line since the values are on the lines,  without having to jump to the legend and guess the color and try to visually match colors with the plot.

For example, in Matlab

clear; close all;
x = 0:0.05:20;
y = 0:0.05:15;
[x,y] = meshgrid(x,y);
z = (11-x-y).^2 + (1+x+10*y-x.*y).^2;
[C,h] =contour(x,y,z,10);
clabel(C,h)

gives

In Maple

f:=(11 - x - y)^2 + (1 + x + 10*y - x*y)^2:
plots:-contourplot(f, x=0..20, y=0..15,
         legend=true,
         contours=10,
         'axes'='boxed',
         legendstyle=[location=right], 
         colorscheme="DivergeRainbow");

Is there a way to tell Maple to put contour labels on the "middle" of the level lines (contour lines) similar to what Matlab does?

I see no such option in https://www.maplesoft.com/support/help/maple/view.aspx?path=plots/contourplot

I think I remeber doing this before but not sure and it is not in my cheat sheet.

Given an expression, I wanted to find all names in it. Which can be done using indets(f,name);

But then how to check if any of the names found are not in the Maple initial known names given in https://www.maplesoft.com/support/help/Maple/view.aspx?path=initialconstants

For example,

f:=x^2 - y^2+Pi;
indets(f,name);

Gives {Pi, x, y}  how does one then check if this list does not have any known name in it?

In this case Pi. I do not want to check explicitly for each name listed on the web page above.

Are these initial known names  grouped in some specific maple type that can be used to check against?

Or is there a command in Maple to return a list of all these initially known names? If so this list can be used to check against.

Asked google AI and it did not know.

Maple 2025.2

Hello,

 I would like to bulild a Gaussian Mixture Model in Maple using the most straightforward apprach:

Apperantly something goes wrong, PDF in (5) is a product not a sum and variance is quadratic in w (6) not linear as it should be.

How to correct this?

Helllo folkx :)

What is wrong in my functions f and g ?

I don't catch the point.

Thanks.

JM--

interface(version);
    Standard Worksheet Interface, Maple 2025.2, Windows 11,
     November 11 2025 Build ID 1971053

with(RandomTools):

Generate(float(range = 2.532000 .. 7.723000, digits = 4));
                             2.537

f := x -> Generate(float(range = 0 .. 100)):

f(30);
                            94.3141

f(0.200000);
                            23.9622

randomize();
                         2413841372727

f(30);
                            86.2657

plot(f(x), x = 1 .. 100.000000);

plots[listplot](sort([seq(Generate(float(range = 0.032100 .. 162.000000, digits = 3)), i = 1 .. 20)]));

plots[listplot](sort([seq(Generate(float(range = 0.032100 .. 162.000000, digits = 3, method = uniform)), i = 1 .. 20)]));

g := ((x -> Generate(float(range = 0 .. x))) assuming (x*float and 0 < x)):

plot(g(x), x = 1 .. 50);
Error, (in RandomTools:-Generate) invalid input: unknown expects value for keyword parameter range to be of type numeric .. numeric, but received 0 .. x

Is the following behavior expected? using  t=0 .. 3*Pi  vs.  t=0 .. round(3*Pi) give different plots.  Why? Should not the plot be the same?

ps. do not know if I asked this before or not. I can't remember. Search in Mapleprimes is not easy.

interface(version);

`Standard Worksheet Interface, Maple 2025.2, Windows 10, November 11 2025 Build ID 1971053`

restart;

ode := diff(y(t), t$2) + y(t)=0;
DEtools:-DEplot(ode, y(t), t=0 .. 3*Pi, y=-1 .. 1,[[y(0)=1,D(y)(0)=0]],linecolor=blue);

diff(diff(y(t), t), t)+y(t) = 0

DEtools:-DEplot(ode, y(t), t=0 .. round(3*Pi), y=-1 .. 1,[[y(0)=1,D(y)(0)=0]],linecolor=blue);

 

 

Download deplot_with_round_jan_17_2026.mw

Would this be considered a bug or expected?

Everytime I see internal error in red, for me, it tells me it is a bug. But wanted to check first what others think.

restart;

interface(version);

`Standard Worksheet Interface, Maple 2025.2, Windows 10, November 11 2025 Build ID 1971053`

ode:=x^2*diff(y(x), x$2) + (cos(x)-1)*diff(y(x), x) + exp(x)*y(x) = 0;
sol:=dsolve(ode,y(x),type='series',x=0):
sol1:=eval(%, _C2=0):
sol2:=eval(%%, _C1=0):

x^2*(diff(diff(y(x), x), x))+(cos(x)-1)*(diff(y(x), x))+exp(x)*y(x) = 0

Y:= unapply(rhs(sol1), x):
eval(lhs(ode), y=Y):
MultiSeries:-asympt(%, x);

Error, (in simpl/min) non-real argument to max/min: -13/2+1/2*I*3^(1/2)

Y:= unapply(rhs(sol2), x):
eval(lhs(ode), y=Y):
MultiSeries:-asympt(%, x);

Error, (in simpl/min) non-real argument to max/min: -13/2-1/2*I*3^(1/2)

 

 

Download asympt_none_real_argument_jan_17_2026.mw

WHen plotting f(x) and g(x) on same plot, and putting legend at bottom (default), the legends show horizontally. i.e. f(x) then g(x) on same line.

I'd like the legend to be stacked vertically, just like when the legend on the right or left, But keep it at bottom. But want to do all this in code. Not using any UI context tools or mouse.

Here is an example

restart;

f:=x->x^3-x^2+1;
g:=x->6-2*x-x^2;
the_legend:=[typeset("f(x) = ",f(x)),typeset("g(x) = ",g(x))]:
plots[setoptions](font=[TIMES,16], labelfont=[TIMES,18]):
the_title:="Plot of f(x) and g(x)":
plot([f(x),g(x)],x=-5..5,
     'gridlines',
     'color'=['red','blue'],
     'legend'=the_legend,
     'legendstyle'=['location'='bottom'],
     'axes'='normal',
     'title'=the_title,  
     'scaling'='unconstrained');

proc (x) options operator, arrow; x^3-x^2+1 end proc

proc (x) options operator, arrow; 6-2*x-x^2 end proc

#I want the above legend to be stacked vertically like the
#following one, but keep it at bottom

plot([f(x),g(x)],x=-5..5,
     'gridlines',
     'color'=['red','blue'],
     'legend'=the_legend,
     'legendstyle'=['location'='right'],
     'axes'='normal',
     'title'=the_title,  
     'scaling'='unconstrained');

 

 

Download legend_question.mw

This way back machine shows how Maple debugger looked like in the year 2005 (that is 20 years ago) in Maple 10.

And it is pretty much the same debugger today. Here is a screen shot side by side of recent version

20 YEARS and nothing changed.

The debugger in Maple is one, if not the main, selling point for Maple compared to its competitor for many.

Even the article above says this

     "But the big plus about the Maple language is that it has a debugger! "

     "Also, the existence of a reasonable debugger in Maple is a big plus. From
      personal experience, I can tell you that debugging Mathematica Notebooks
     can be both time consuming and frustrating."

Can the debugger be improved, so it is easier to use? 

All what is needed is to change the UI so  one can see more code as they are stepping in, like with Matlab debugger for example.

That is all. Currently it is a pain using the debugger, since one only sees one or 2-3  lines at time as they step in the code instead of seeing complete code with full screen which makes it much easier to see things.

Instead of Maplesoft wasting time on AI and cosmetics, do something practical for developers and improve the debugger.

It should not take a software company 40 years just to improve a UI for a debugger. What is the blocking issue here? 

Just hire one or two programmers and they can do this in 6 months.

Given equation such as 1/A=x/A, at school we are allowed to write this as 1=x by canceling A on both side.

But in Maple, even if I tell it that A is not zero, it still refuses to simplify it and cancel A from both sides.

What could be the reson for this?

eq:= 1/A = x/A;
simplify(eq) assuming A<>0

Using Mathematica it does it:

I am not looking for workaround, I know how to force this if needed, one way could be

numer(normal((lhs-rhs)(eq)))=0

gives 1 - x = 0

My question is why Maple's simplify does not simplify it automatically? Even using simplify with size option did not. Is it just weakness in simplify or is there a subtle mathematical reason behind it which I am missing?

Maple 2025.2

Given first order nonlinear ode which is hard to solve using standard methods, the smart dsolve sometimes uses a method where it linearizes the first order ode to a linear second order ode and solves that.

Then with that solution to the linear second order ode, it is able to find the solution of the first order ode (need to resolve the constants of integration to merge them into one, but this part is easy to do).

My question is, how and what method it uses to "linearizes by differentation"? I could not find this in any textbook I have, and not able to see how it does.

Here is an example where it uses this method to solving this first order ode

restart;

Typesetting:-Unsuppress('all'); #always do this.
Typesetting:-Settings(prime=x,'typesetprime'=true); #this says to use y'(x) instead of dy/dx    
Typesetting:-Suppress(y(x)); # this says to use y' and not y'(x)

ode:=diff(y(x),x) = (-y(x)^2+4*a*x)^2/y(x); 
infolevel[dsolve]:=5;
dsolve(ode,y(x), singsol=all);

Tracing says 

So it says, if I understand, that it differentiated the original given first order ode and then linearized the resulting second order ode to the above, which is    y''=-64 a^2 x^2 y - 16 a x y' which is certainly linear second order ode and now can be solved using kovacic algorithm. Now the solution to the first order ode can be obtained.

But when differentiating the first order ode, this is the result

expand(diff(ode,x))

So the question is, did Maple mean it "linearized" the above to y''=-64 a^2 x^2 y - 16 a x y' 

If so, then how? Did it use Taylor series? but if so, where it expanded about? Or did it use some other method?  One thing I noticed is that by multiplying the RHS above by y^2 it becomes

And "removing" the nonlinear terms (say expansion is around y=0, so higher order y terms are very small and can be removed) the RHS above becomes

    y'' y^2 = -16 y' a^2 x^2 + 32 a^2 x y

Which is close to Maple shows, but 32 instead of 64, and what about the y^2 on the left side?  Is this method even valid mathematically to do? Since solution that result will be correct only near y=0?

So far, trying to step in the debugger to find how, I was not able to find where it does that but will keep trying.

Any idea what Maple means by linearization to 2nd order and how it does it?

ps. only case I know about, where nonlinear first order ode can be transformed to linear second order ode is the Riccati ode using transformation y=u'/u. But this  first order ode is not Riccati.

1 2 3 4 5 6 7 Last Page 1 of 16